package org.jeecg.modules.monitoring.j_monitoring.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 计算资源(管理)
 * @Author: xiaoyq
 * @Date:   2023-01-08
 * @Version: V1.0
 */
@Data
@TableName("m_gl_computing_resource")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="计算资源", description="计算资源(管理)")
public class MGlComputingResource implements Serializable {
    private static final long serialVersionUID = 1L;


	/**id;主键*/
	@TableId(type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "id;主键")
	private java.lang.String id;

	/**设备名称*/
	@Excel(name = "设备名称", width = 15)
	@ApiModelProperty(value = "设备名称")
	private java.lang.String name;
	/**设备型号*/
	@Excel(name = "设备型号", width = 15)
	@ApiModelProperty(value = "设备型号")
	private java.lang.String model;
	/**设备序列号*/
	@Excel(name = "设备序列号", width = 15)
	@ApiModelProperty(value = "设备序列号")
	private java.lang.String equipmentSerialNumber;
	/**设备类型*/
	@Excel(name = "设备类型", width = 15, dicCode = "j_sbfl")
	@Dict(dicCode = "j_sbfl")
	@ApiModelProperty(value = "设备类型")
	private java.lang.String equipmentClassification;
	/**系统IP*/
	@Excel(name = "系统IP", width = 15)
	@ApiModelProperty(value = "系统IP")
	private java.lang.String systemIp;
	/**管理IP*/
	@Excel(name = "管理IP", width = 15)
	@ApiModelProperty(value = "管理IP")
	private java.lang.String deviceIp;
	/**使用状态*/
	@Excel(name = "使用状态", width = 15, dicCode = "j_syzt")
	@Dict(dicCode = "j_syzt")
	@ApiModelProperty(value = "使用状态")
	private java.lang.String usageStatus;
	/**设备用途*/
	@Excel(name = "设备用途", width = 15, dicCode = "j_sbyt")
	@Dict(dicCode = "j_sbyt")
	@ApiModelProperty(value = "设备用途")
	private java.lang.String purpose;
	/**操作系统*/
	@Excel(name = "操作系统", width = 15)
	@ApiModelProperty(value = "操作系统")
	private java.lang.String operatingSystem;
	/**单CPU核数(个)*/
	@Excel(name = "单CPU核数(个)", width = 15)
	@ApiModelProperty(value = "单CPU核数(个)")
	private java.lang.Integer oneCpu;
	/**cpu个数*/
	@Excel(name = "CPU个数", width = 15)
	@ApiModelProperty(value = "CPU个数")
	private java.lang.Integer cpuNo;
	/**cpu总核数(个)*/
	@Excel(name = "CPU总核数(个)", width = 15)
	@ApiModelProperty(value = "CPU总核数(个)")
	private java.lang.Integer cpuCoresNo;
	/**内存条数*/
	@Excel(name = "内存条数", width = 15)
	@ApiModelProperty(value = "内存条数")
	private java.lang.Integer memoryNo;
	/**内存条容量(G)*/
	@Excel(name = "内存条容量(G)", width = 15)
	@ApiModelProperty(value = "内存条容量(G)")
	private java.lang.Integer singleStripCapacity;
	/**总内存容量(G)*/
	@Excel(name = "总内存容量(G)", width = 15)
	@ApiModelProperty(value = "总内存容量(G)")
	private java.lang.String memoryModulesNo;
	/**硬盘数量*/
	@Excel(name = "硬盘数量", width = 15)
	@ApiModelProperty(value = "硬盘数量")
	private java.lang.Integer hardDisksNo;
	/**硬盘总容量(G)*/
	@Excel(name = "硬盘总容量(G)", width = 15)
	@ApiModelProperty(value = "硬盘总容量(G)")
	private java.lang.Integer singleHardDiskNo;
	/**硬盘列表*/
	@Excel(name = "硬盘列表", width = 15)
	@ApiModelProperty(value = "硬盘列表")
	private java.lang.String hardList;
	/**RAID 方式*/
	@Excel(name = "RAID 方式", width = 15, dicCode = "j_raid")
	@Dict(dicCode = "j_raid")
	@ApiModelProperty(value = "RAID 方式")
	private java.lang.String raid;
	/**网络接口数量(个)*/
	@Excel(name = "网络接口数量(个)", width = 15)
	@ApiModelProperty(value = "网络接口数量(个)")
	private java.lang.Integer networkInterfaceNo;
	/**接口类型*/
	@Excel(name = "接口类型", width = 15, dicCode = "j_jklx")
	@Dict(dicCode = "j_jklx")
	@ApiModelProperty(value = "接口类型")
	private java.lang.String interfaceType;
	/**接口列表*/
	@Excel(name = "接口列表", width = 15)
	@ApiModelProperty(value = "接口列表")
	private java.lang.String interfaceList;
	/**电源规格*/
	@Excel(name = "电源规格", width = 15, dicCode = "j_dygg")
	@Dict(dicCode = "j_dygg")
	@ApiModelProperty(value = "电源规格")
	private java.lang.String powerSpecification;
	/**电源数量*/
	@Excel(name = "电源数量", width = 15)
	@ApiModelProperty(value = "电源数量")
	private java.lang.Integer powerNo;
	/**额定功率(w)*/
	@Excel(name = "额定功率(w)", width = 15)
	@ApiModelProperty(value = "额定功率(w)")
	private java.lang.Integer devicePower;
	/**品牌(制造)商*/
	@Excel(name = "品牌(制造)商", width = 15)
	@ApiModelProperty(value = "品牌(制造)商")
	private java.lang.String deviceProducer;

	@ApiModelProperty(value = "品牌(制造)商")
	private java.lang.String deviceProducerId;
	/**供应商*/
	@Excel(name = "供应商", width = 15)
	@ApiModelProperty(value = "供应商")
	private java.lang.String deviceSupplier;
	@ApiModelProperty(value = "供应商")
	private java.lang.String deviceSupplierId;
	/**	 维保商*/
	@Excel(name = "	 维保商", width = 15)
	@ApiModelProperty(value = "	 维保商")
	private java.lang.String deviceExpiry;
	@ApiModelProperty(value = "	 维保商Id")
	private java.lang.String deviceExpiryId;
	/**资产编号*/
	@Excel(name = "资产编号", width = 15)
	@ApiModelProperty(value = "资产编号")
	private java.lang.String assetNo;
	/**合同编号*/
	@Excel(name = "合同编号", width = 15)
	@ApiModelProperty(value = "合同编号")
	private java.lang.String contractNo;
	/**设备编号*/
	@Excel(name = "设备编号", width = 15)
	@ApiModelProperty(value = "设备编号")
	private java.lang.String equipmentNo;
	/**责任人*/
	@Excel(name = "责任人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
	@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
	@ApiModelProperty(value = "责任人")
	private java.lang.String personLiable;
	@ApiModelProperty(value = "责任人id")
	private java.lang.String personLiableId;

	/**投产时间*/
	@Excel(name = "投产时间", width = 15)
	@ApiModelProperty(value = "投产时间")
	private java.lang.String productionDate;
	/**维保开始时间*/
	@Excel(name = "维保开始时间", width = 15)
	@ApiModelProperty(value = "维保开始时间")
	private java.lang.String installDate;
	/**报修号*/
	@Excel(name = "报修号", width = 15)
	@ApiModelProperty(value = "报修号")
	private java.lang.String repairNo;
	/**维保结束时间*/
	@Excel(name = "维保结束时间", width = 15)
	@ApiModelProperty(value = "维保结束时间")
	private java.lang.String expiryDateOfMaintenance;
	/**报废年限*/
	@Excel(name = "报废年限", width = 15)
	@ApiModelProperty(value = "报废年限")
	private java.lang.String scrapLife;
	/**是否监测*/
	@Excel(name = "是否监测", width = 15, dicCode = "j_sfjc")
	@Dict(dicCode = "j_sfjc")
	@ApiModelProperty(value = "是否监测")
	private java.lang.String whetherToMonitor;
	/**是否监测*/
	@Excel(name = "监测方式", width = 15, dicCode = "j_jcfs")
	@Dict(dicCode = "j_jcfs")
	@ApiModelProperty(value = "监测方式")
	private String monitorWay;
	/**上联网络交换机*/
	@Excel(name = "上联网络交换机", width = 15)
	@ApiModelProperty(value = "上联网络交换机")
	private java.lang.String onlineNetworkSwitch;

	@ApiModelProperty(value = "网络交换机Name")
	@Dict(dictTable = "m_gl_network_resource",dicCode = "id",dicText = "concat_ws('',name,' 型号:',model,' IP:',manage_ip,' 机柜:',cabinet,' U位:',use_u_q,'~',use_u_h)")
	private java.lang.String onlineNetworkSwitchId;

	/**上联光纤交换机*/
	@Excel(name = "上联光纤交换机", width = 15)
	@ApiModelProperty(value = "上联光纤交换机")
	private java.lang.String uplinkOpticalSwitch;

	@ApiModelProperty(value = "光纤交换机Name")
	@Dict(dictTable = "m_gl_network_resource",dicCode = "id",dicText = "concat_ws('',name,' 型号:',model,' IP:',manage_ip,' 机柜:',cabinet,' U位:',use_u_q,'~',use_u_h)")
	private java.lang.String uplinkOpticalSwitchId;

	/**关联存储*/
	@Excel(name = "关联存储", width = 15)
	@ApiModelProperty(value = "关联存储")
	private java.lang.String associatedStorage;

	//"concat_ws('',name,' 型号:',model,' 管理IP:',device_ip,' 机柜:',cabinet,' U位:',use_u_q,'~',use_u_h)"
	@Dict(dictTable = "m_gl_storage_resources",dicCode = "id",dicText = "display_name")
	@ApiModelProperty(value = "关联存储Id")
	private java.lang.String associatedStorageId;

	/**所属集群*/
	@Excel(name = "所属集群", width = 15)
	@ApiModelProperty(value = "所属集群")
	private java.lang.String cluster;

	/**所属集群Id*/
	@ApiModelProperty(value = "所属集群Id")
	private String clusterId;

	/**关联应用*/
	@Excel(name = "关联应用", width = 15)
	@ApiModelProperty(value = "关联应用")
	private java.lang.String associatedApplication;
	/**所属区域*/
	@Excel(name = "所属区域", width = 15)
	@ApiModelProperty(value = "所属区域")
	private java.lang.String region;
	/**所属机房*/
	@Excel(name = "所属机房", width = 15)
	@ApiModelProperty(value = "所属机房")
	private java.lang.String machineRoom;
	/**所属机柜*/
	@Excel(name = "所属机柜", width = 15)
	@ApiModelProperty(value = "所属机柜")
	private java.lang.String cabinet;
	/**高度(U)*/
	@Excel(name = "高度(U)", width = 15)
	@ApiModelProperty(value = "高度(U)")
	private java.math.BigDecimal height;
	/**使用U位前*/
	@Excel(name = "使用U位前", width = 15)
	@ApiModelProperty(value = "使用U位前")
	private java.lang.Integer useUQ;
	/**使用U位后*/
	@Excel(name = "使用U位后", width = 15)
	@ApiModelProperty(value = "使用U位后")
	private java.lang.Integer useUH;

	/**区域id*/
	@ApiModelProperty(value = "区域id")
	private java.lang.String regionId;
	/**机房Id*/
	@ApiModelProperty(value = "机房Id")
	private java.lang.String machineRoomId;
	/**机柜id*/
	@ApiModelProperty(value = "机柜id")
	private java.lang.String cabinetId;

	private String monitorStatus;

	/**备注*/
	@Excel(name = "备注", width = 15)
	@ApiModelProperty(value = "备注")
	private java.lang.String remarks;

	@ApiModelProperty(value = "显示名称")
	private String displayName;

	public String autoSetDisplayName(){
		this.displayName = this.getName() + ( this.deviceIp!=null? this.getDeviceIp() : "" );
		return this.displayName;
	}

	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@ApiModelProperty(value = "创建时间")
	private java.util.Date createTime;

	/**更新时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
	@DateTimeFormat(pattern="yyyy-MM-dd")
	@ApiModelProperty(value = "更新时间")
	private java.util.Date updateTime;

	/**创建人*/
	@ApiModelProperty(value = "创建人")
	private java.lang.String createBy;

	/**更新人*/
	@ApiModelProperty(value = "更新人")
	private java.lang.String updateBy;

	@TableField(exist = false)
	private Boolean isMonitor = false;

}
